package com.hecore.lagou.speak.soft;

import com.hecore.lagou.speak.entity.SpeakBeanSort;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @Author: hecore
 * @Date: 2020/10/19 00:06
 * @Description:
 */

public class SortReducer extends Reducer<SpeakBeanSort, NullWritable,
        NullWritable, SpeakBeanSort> {
    @Override
    protected void reduce(SpeakBeanSort key, Iterable<NullWritable> values,
                          Context context) throws IOException, InterruptedException {
        for (NullWritable value : values) {
            context.write(value, key);
        }
    }
}
